package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.DataType;
import com.yanmaohu.yulia.bean.DropBehavior;

/**
 * @author Bright Lee
 */
public final class DropUserDefinedCastStatement implements SqlSchemaManipulationStatement {

    private int beginIndex;
    private int endIndex;
    private DataType sourceDataType;
    private DataType targetDataType;
    private DropBehavior dropBehavior;

    public DropUserDefinedCastStatement(int beginIndex,
                                        DataType sourceDataType,
                                        DataType targetDataType,
                                        DropBehavior dropBehavior) {
        this.beginIndex = beginIndex;
        this.endIndex = dropBehavior.getEndIndex();
        this.sourceDataType = sourceDataType;
        this.targetDataType = targetDataType;
        this.dropBehavior = dropBehavior;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public DataType getSourceDataType() {
        return sourceDataType;
    }

    public DataType getTargetDataType() {
        return targetDataType;
    }

    public DropBehavior getDropBehavior() {
        return dropBehavior;
    }

}
